<?=$this->render('header.phtml') ?>

<?=$this->render('logo.phtml') ?>

<?=$this->render('sidelist.phtml') ?>

<h2>Password Manager</h2>

<?php if (isset($this->messages)): ?>
 <?php foreach ($this->messages as $message): ?>
 <p class="message"><?= $message ?></p>
 <?php endforeach; ?>
<?php endif; ?>

<div id="container">
  <div class="addcat" id="addcategory">
  	<form method="post" action="<?= $this->url(array('action' => 'add'), 'categories') ?>">New: <input type="text" name="newcat" size="20" /><input type="submit" value="Add" />
  	</form>  <a href="#" style="font-style: italic; font-size: 0.75em;" onclick="javascript:getElementById('addcategory').style.display = 'none';">Cancel</a>
  </div>

 <hr />
 <h2>Add New Password</h2>
 <form method="post" action="<?= $this->url(array('action' => 'add'), 'passwords') ?>">
  <p><label for="category">Choose Category:</label> <select name="category" id="category"><option value="0">Uncategorized</option>
 <?php if (count($this->categories) >= 1): ?>
  <?php foreach ($this->categories as $cat): ?>
   <option value="<?= $cat['uid'] ?>"><?= $cat['category'] ?></option>
  <?php endforeach; ?>
 <?php endif; ?>
 </select>
  <a href="#" onclick="javascript:getElementById('addcategory').style.display = 'block';">New</a>
 </p>
 <p><label for="summary">Summary:</label> <input type="text" name="summary" id="summary" size="20" /></p>
 <p><label for="username">Username:</label> <input type="text" name="username" id="username" size="20" /></p>
 <p><label for="password">Password:</label> <input type="text" name="password" id="password" size="20" /></p>
 <p><label for="website">Web site:</label> <input type="text" name="website" id="website" size="25" /></p>
 <p><label for="notes">Notes:</label> <input type="text" name="notes" id="notes" size="30" /></p>
 <p><input type="submit" value="Add" /></p>
 </form>
</div>

<?=$this->render('footer.phtml') ?>